/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ma.projet.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Maison
 */
@Entity
@Table(name = "statut")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Statut.findAll", query = "SELECT s FROM Statut s"),
    @NamedQuery(name = "Statut.findByStatutID", query = "SELECT s FROM Statut s WHERE s.statutID = :statutID"),
    @NamedQuery(name = "Statut.findByLibelle", query = "SELECT s FROM Statut s WHERE s.libelle = :libelle"),
    @NamedQuery(name = "Statut.findByActive", query = "SELECT s FROM Statut s WHERE s.active = :active")})
public class Statut implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "statutID")
    private Long statutID;
    @Size(max = 254)
    @Column(name = "libelle")
    private String libelle;
    @Column(name = "active")
    private Integer active;

    public Statut() {
    }

    public Statut(Long statutID) {
        this.statutID = statutID;
    }

    public Long getStatutID() {
        return statutID;
    }

    public void setStatutID(Long statutID) {
        this.statutID = statutID;
    }

    public String getLibelle() {
        return libelle;
    }

    public void setLibelle(String libelle) {
        this.libelle = libelle;
    }

    public Integer getActive() {
        return active;
    }

    public void setActive(Integer active) {
        this.active = active;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (statutID != null ? statutID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Statut)) {
            return false;
        }
        Statut other = (Statut) object;
        if ((this.statutID == null && other.statutID != null) || (this.statutID != null && !this.statutID.equals(other.statutID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ma.projet.entities.Statut[ statutID=" + statutID + " ]";
    }
    
}
